package com.example.myblog.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * <p>
 * 博客
 * </p>
 *
 * @author 叶兴
 * @since 2022-09-29
 */
@Data
@TableName("blog")
@Document(indexName = "blog")
public class Blog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableField("blog_id")
    @Id
    private String blogId;

    /**
     * 文章内容
     */
    @TableField("blog_text")
    @Field(type = FieldType.Text,searchAnalyzer = "ik_max_word",copyTo = "all")
    private String blogText;


}
